//
//  ZNTabBarController.h
//  ZNTabBarController
//
//  Created by Sniper on 15/12/23.
//  Copyright © 2015年 Sniper. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ZNTabBar.h"

@protocol ZNTabBarControllerDelegate;

@interface ZNTabBarController : UIViewController

@property (nonatomic, weak)id<ZNTabBarControllerDelegate> delegate;

@property (nonatomic, copy)NSArray *viewControllers;

@property (nonatomic, readonly)ZNTabBar *tabbar;

@property (nonatomic, weak) UIViewController *selectedViewController;

@property (nonatomic) NSUInteger selectedIndex;

@end

@protocol ZNTabBarControllerDelegate <NSObject>

// didselect
- (void)tabBarController:(ZNTabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController;

@end

@interface UIViewController (RDVTabBarControllerItem)

@property(nonatomic, setter = zn_setTabBarItem:) ZNTabBarItem *tabbarItem;

@property(nonatomic, readonly) ZNTabBarController *zn_tabBarController;

@end
